<template>
  <div class="sgh-radio">
    <Label :value="labelValue" :name="name" />
    <section
      v-for="(item, index) in radioList"
      :key="index"
      class="radio-group"
    >
      <input type="radio" :value="item.value" :name="name" :checked="item.value == checkValue ? true : false"/>{{ item.label }}
    </section>
  </div>
</template>

<script>
import Label from "@/components/Label/index.vue";
export default {
  props: ["labelValue", "name", "radioList", "checkValue"],
  components: {
    Label,
  },
};
</script>

<style lang="scss">
$theme-green-color: #48aa4e;
.sgh-radio {
  .radio-group {
    display: flex;
    align-items: center;
    input[type="radio"] {
      cursor: pointer;
    }
  }
}
</style>